#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int cc1, cc2, cc3, cc4, cc5;
	int A, B, C, D, E;
	int g=0;
	for (A = 1; A <= 5; A++)
	{
		for (B = 1; B <= 5; B++)
		{
			for (C = 1; C <= 5; C++)
			{
				for (D = 1; D <= 5; D++)
				{
					for (E = 1; E <= 5; E++)
					{
						cc1 = ((B == 2) && (!(A == 3))) || ((!(B == 2)) && (A == 3));
						cc2 = ((B == 2) && (!(E == 4))) || ((!(B == 2)) && (E == 4));
						cc3 = ((C == 1) && (!(D == 2))) || ((!(C == 1)) && (D == 2));
						cc4 = ((C == 5) && (!(D == 3))) || ((!(C == 5)) && (D == 3));
						cc5 = ((E == 4) && (!(A == 1))) || ((!(E == 4)) && (A == 1));
						if (((cc1 + cc2 + cc3 + cc4 + cc5) == 5) && (A != B) && (A != C) && (A != E) && (A != D) && (B != C) && (B != D) && (B != E) && (C != D) && (C != E) && (D != E))
						{
							g = 1;
							printf("A %d\n", A);
							printf("B %d\n", B);
							printf("C %d\n", C);
							printf("D %d\n", D);
							printf("E %d\n", E);
							if (g != 1)
								printf("Can't found!\n");
						}
					}
					

				}
			}
		}
	}
	return 0;
}